import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../components/login'
import home from '../components/home'
import welcome from "@/components/welcome";
import users from "@/components/user/users";

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'login',
    component: Login
  },
  {
    path: '/login',
    name: 'login',
    component: Login
  },
  {
    path: '/home',
    component: home,
    redirect: '/welcome',
    children:[
      {path: '/welcome',component:welcome},
      {path: '/yhlb',component:users},
    ]
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
